﻿<%@ page language="C#" autoeventwireup="true" inherits="Admin_OtherEdit, App_Web_otheredit.aspx.fdf7a39c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/main-admin.css" rel="stylesheet" type="text/css" />

    <script src="../Jscript/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../Jscript/page.js" type="text/javascript"></script>

    <style type="text/css">
        .qyd
        {
            width: 100px;
            border: 1px solid #CCC;
            height: 20px;
        }
        .mdd
        {
            width: 100px;
            border: 1px solid #CCC;
            height: 20px;
        }
        .hwzl
        {
            width: 100px;
            border: 1px solid #CCC;
            height: 20px;
        }
        .zffs
        {
            width: 100px;
            border: 1px solid #CCC;
            height: 20px;
        }
    </style>

    <script type="text/javascript">
var count=<%=pcount %>
        $(document).ready(function() {
<%=ajax %>

        });

        function ToSet(tp) {
            switch (tp) {

                case "date":

                    var v = $(".sj:first").val();
                    $(".sj").val(v);
                    break;
                case "ckh":
                    var v = $(".ckh:first").val();

                    $(".ckh").val(v);
                    break;

                case "qyd":
                    var v = $(".qyd:first").val();

                    $(".qyd").val(v);
                    break;
                case "mdd":
                    var v = $(".mdd:first").val();

                    $(".mdd").val(v);
                    break;

                case "hk":
                    var v = $(".hkd:first").val();

                    $(".hkd").val(v);
                    break;
                case "pay":
                    var v = $(".zffs:first").val();

                    $(".zffs").val(v);
                    break;
                case "huowu":
                    var v = $(".hwzl:first").val();

                    $(".hwzl").val(v);
                    break;
                    case "daihao":
                          var v = $(".daihaook:first").val();

                    $(".daihaook").val(v);
                    break;
            }

        }


        function SetPalce1(tno, text) {
            var count = $("select[title='p1" + tno + "']").length;

            for (var i = 0; i < 5; i++) {

                if ($("select[title='p1" + tno + "']").get(0).options[i].text == text) {

                    $("select[title='p1" + tno + "']").get(0).options[i].selected = true;

                    break;
                }
                else {

                }
            }
        }

        function SetPalce2(tno, text) {
         //   var count = $("select[title='p2" + tno + "']").options.length;
 
            for (var i = 0; i < count; i++) {

                if ($("select[title='p2" + tno + "']").get(0).options[i].text == text) {

                    $("select[title='p2" + tno + "']").get(0).options[i].selected = true;

                    break;
                }
                else {

                }
            }
        }
        function SetPay(tno, text) {
            var count = $("select[title='p3" + tno + "']").length;

            for (var i = 0; i < 4; i++) {

                if ($("select[title='p3" + tno + "']").get(0).options[i].value == text) {

                    $("select[title='p3" + tno + "']").get(0).options[i].selected = true;

                    break;
                }
                else {

                }
            }
        }
        
           function Sethuowu(tno, text) {
            var count = $("select[title='p4" + tno + "']").length;

            for (var i = 0; i < 3; i++) {

                if ($("select[title='p4" + tno + "']").get(0).options[i].value == text) {

                    $("select[title='p4" + tno + "']").get(0).options[i].selected = true;

                    break;
                }
                else {

                }
            }
        }
        
        
   
    </script>

</head>
<body>

    <script type="text/javascript" src="../DatePicker/WdatePicker.js"></script>

    <form id="form1" runat="server">
    <div class="title">
        其它编辑</div>
    <div class="trans-search-title">
        <div class="trans-edit-no">
            货运单号</div>
        <div class="trans-edit-date">
            制单时间
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('date')" /></div>
        <div class="trans-edit-ref" style="width: 80px">
            参考号
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('ckh')" /></div>
        <div class="trans-edit-des">
            启运地
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('qyd')" /></div>
        <div class="trans-edit-arr">
            目的地
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('mdd')" /></div>
        <div class="trans-edit-air" style="width: 80px">
            航空单号
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('hk')" /></div>
        <div class="trans-edit-pay">
            支付方式
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('pay')" /></div>
        <div class="trans-edit-itemtype">
            货物种类
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('huowu')" /></div>
        <div class="trans-edit-itemtype" style="width: 80px">
            袋号
            <img src="../images/arr-down-s.gif" width="13" height="13" align="absmiddle" onclick="ToSet('daihao')" /></div>
    </div>
    <asp:Repeater ID="list" runat="server">
        <ItemTemplate>
            <%#Eval("Sep").ToString() == "True" ? "<div  id=\"div" + Container.ItemIndex + "\"  class=\"trans-search-line\" style=\"background-color:#cccccc\">" : "<div   id=\"div" + Container.ItemIndex + "\"  class=\"trans-search-line\">"%>
            <div class="trans-edit-no">
                <asp:Label ID="IsSep" Text='<%#Eval("Sep").ToString() == "True"?"Sep":""%>' runat="server"
                    ForeColor="Red"></asp:Label>
                <a href="#">
                    <asp:Label ID="no_txt" Text='<%#Eval("TrackingNo")%>' runat="server"></asp:Label></a></div>
            <div class="trans-edit-date">
                <input type="text" name="textfield2" id="createdt" runat="server" class="sj" value='<%#Eval("CreateDate") %>'
                    onclick="WdatePicker({skin:'blue',dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 100px;
                    border: 1px solid #CCC; height: 15px;" /></div>
            <div class="trans-edit-ref" style="width: 80px">
                <input type="text" name="textfield2" id="cankao" runat="server" value='<%#Eval("FlightNo")%>'
                    class="ckh" style="width: 70px; border: 1px solid #CCC; height: 15px;" /></div>
            <div class="trans-edit-des">
                <asp:DropDownList ID="qiyudi" runat="server" CssClass="qyd" DataTextField="PlaceName"
                    ToolTip='<%#GetTitle(1,Eval("TrackingNo").ToString())%>' DataValueField="ID"
                    DataSource='<%#GetDt(1, Eval("TrackingNo").ToString(),Eval("Origin").ToString()) %>'>
                </asp:DropDownList>
            </div>
            <div class="trans-edit-arr">
                <asp:DropDownList ID="mudidi" runat="server" CssClass="mdd" DataTextField="PlaceName"
                    ToolTip='<%#GetTitle(2,Eval("TrackingNo").ToString())%>' DataValueField="ID"
                    DataSource='<%#GetDt(2,Eval("TrackingNo").ToString(),Eval("Destination").ToString()) %>'>
                </asp:DropDownList>
            </div>
            <div class="trans-edit-air" style="width: 80px">
                <input type="text" name="textfield2" id="hangkongdanhao" runat="server" class="hkd"
                    style="width: 70px; border: 1px solid #CCC; height: 15px;" value='<%#Eval("AerialNo")%>' /></div>
            <div class="trans-edit-pay">
                <asp:DropDownList ID="zhifufangshi" runat="server" CssClass="zffs" DataTextField="ModelName"
                    ToolTip='<%#GetTitle(3,Eval("TrackingNo").ToString())%>' DataValueField="PID"
                    DataSource='<%#GetDt(3,Eval("TrackingNo").ToString(),Eval("Payment").ToString()) %>'>
                </asp:DropDownList>
            </div>
            <div class="trans-edit-itemtype">
                <asp:DropDownList ID="huopwuzl" runat="server" CssClass="hwzl" ToolTip='<%#GetHuowuName(Eval("TrackingNo").ToString(),Eval("Packing").ToString())%>'>
                    <asp:ListItem Text="文件" Value="0"></asp:ListItem>
                    <asp:ListItem Text="私人包裹" Value="1"></asp:ListItem>
                    <asp:ListItem Text="样品" Value="2"></asp:ListItem>
                </asp:DropDownList>
            </div>
            <div class="trans-edit-air" style="width: 80px">
                <input type="text" name="textfield2" id="daihao" runat="server" class="daihaook"
                    style="width: 70px; border: 1px solid #CCC; height: 15px;" value='<%#Eval("Description")%>' /></div>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    </div>
    <asp:Label ForeColor="Red" ID="showerr" runat="server"></asp:Label>
    <div style="color: #606; font-weight: bold; float: left; width: 966px; margin-top: 20px;
        text-align: center;">
        <div style="width: 100%; text-align: right">
            <div style="margin: 10px 0px 0px 3px;">
                <img src="../images/arrow-up.gif" width="25" height="24" />
                &nbsp;
                <asp:ImageButton ImageAlign="AbsMiddle" ID="ImageButton1" runat="server" ImageUrl="~/images/btn-itemlot.gif"
                    Width="68" Height="25" onclick="ImageButton1_Click" />
                &nbsp;
                <asp:ImageButton ImageAlign="AbsMiddle" ID="ImageButton2" runat="server" ImageUrl="~/images/btn-pricelot.gif"
                    Width="68" Height="25" onclick="ImageButton2_Click" />
                &nbsp;
                <asp:ImageButton ImageAlign="AbsMiddle" ID="ImageButton3" runat="server" ImageUrl="~/images/btn-pringlogolot.gif"
                    Width="68" Height="25" onclick="ImageButton3_Click" />
                &nbsp;&nbsp;
            </div>
        </div>
        <asp:ImageButton ImageAlign="AbsMiddle" ID="okbtn" runat="server" ImageUrl="~/images/btn-save-trans.gif"
            Width="192" Height="40" OnClick="okbtn_Click" /></div>
    </form>
</body>
</html>
